package com.haiya.identityaccess.infrastructure.persistence.mybatis.datamodel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

/**
 * @author qiaoguoqiang
 */
@TableName("tbl_user")
public class DataUser {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer enablementEnabled;
    private Date enablementEndDate;
    private Date enablementStartDate;
    private String password;
    private String tenantIdId;
    private String username;
    private Integer concurrencyVersion;

    public DataUser() {
    }

    public DataUser(
            String tenantIdId,
            String username,
            String password,
            Integer enablementEnabled,
            Date enablementEndDate,
            Date enablementStartDate) {
        this.enablementEnabled = enablementEnabled;
        this.enablementEndDate = enablementEndDate;
        this.enablementStartDate = enablementStartDate;
        this.password = password;
        this.tenantIdId = tenantIdId;
        this.username = username;
        this.concurrencyVersion = 1;
    }

    public DataUser(
            String tenantIdId,
            String username,
            String password,
            Integer enablementEnabled,
            Date enablementEndDate,
            Date enablementStartDate,
            Integer concurrencyVersion) {
        this.enablementEnabled = enablementEnabled;
        this.enablementEndDate = enablementEndDate;
        this.enablementStartDate = enablementStartDate;
        this.password = password;
        this.tenantIdId = tenantIdId;
        this.username = username;
        this.concurrencyVersion = concurrencyVersion;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getEnablementEnabled() {
        return enablementEnabled;
    }

    public void setEnablementEnabled(Integer enablementEnabled) {
        this.enablementEnabled = enablementEnabled;
    }

    public Date getEnablementEndDate() {
        return enablementEndDate;
    }

    public void setEnablementEndDate(Date enablementEndDate) {
        this.enablementEndDate = enablementEndDate;
    }

    public Date getEnablementStartDate() {
        return enablementStartDate;
    }

    public void setEnablementStartDate(Date enablementStartDate) {
        this.enablementStartDate = enablementStartDate;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getTenantIdId() {
        return tenantIdId;
    }

    public void setTenantIdId(String tenantIdId) {
        this.tenantIdId = tenantIdId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getConcurrencyVersion() {
        return concurrencyVersion;
    }

    public void setConcurrencyVersion(Integer concurrencyVersion) {
        this.concurrencyVersion = concurrencyVersion;
    }
}
